#ifndef BASE_H
#define BASE_H

#include <stdint.h>

typedef enum zhen_status{
    OK,
    ERROR,
    INVALID,
    NOT_FOUND,
    NOT_IMPLEMENTED,
} sts;

struct device{
    uint8_t id;
    sts (*init)(void);
    sts (*read_b)(uint32_t addr, uint8_t *data);
    sts (*read_h)(uint32_t addr, uint16_t *data);
    sts (*read_w)(uint32_t addr, uint32_t *data);
    sts (*write_b)(uint32_t addr, uint8_t data);
    sts (*write_h)(uint32_t addr, uint16_t data);
    sts (*write_w)(uint32_t addr, uint32_t data);
};

#endif
